package com.jvtd.demo.recyclerView;

import android.databinding.ViewDataBinding;
import android.support.annotation.Nullable;

import com.jvtd.demo.BR;
import com.jvtd.demo.R;
import com.jvtd.widget.adapter.JvtdQuickAdapter;
import com.jvtd.widget.adapter.viewHolder.JvtdViewHolder;

import java.util.ArrayList;

public class DemoAdapter extends JvtdQuickAdapter<RvBean,JvtdViewHolder> {
    public DemoAdapter() {
        super(R.layout.adapter_demo_item, new ArrayList<>());
    }

    @Override
    protected void convert(JvtdViewHolder helper, RvBean item) {
        ViewDataBinding binding = helper.getBinding();
        binding.setVariable(BR.itemBean, item);
        binding.executePendingBindings();
    }
}
